const state = {
  loading: false,
  mapId: 'map',
  itemName: 'tianjin',
  mapName: 'tianjin_WGS84',
  extent: [115.32814569096264, 38.40597278179692, 119.43985430903736, 40.41257224801359],
  group: 'main',
  areaConfig: {
      fileName: 'regionData.json'
  },
  userAreaCode: '12',
  drawLayerId: 'drawLayerId', // 绘制图层id
};

const getters = {
  getLoading: state => state.loading,
  getMapId: state => state.mapId,
  getItemName: state => state.itemName,
  getMapName: state => state.mapName,
  getExtent: state => state.extent,
  getGroup: state => state.group,
  getAreaConfig: state => state.areaConfig,
  getUserAreaCode: state => state.userAreaCode,
  getDrawLayerId: state => state.drawLayerId,
};

const mutations = {
  setLoading(state, data) {
    state.loading = data;
  },
}

const actions = {
  setLoading(store, data) {
    store.commit('setLoading', data)
  },
};

export default {
  state,
  getters,
  mutations,
  actions
}
